<div ng-controller="Supplier_MoreWarehouseEntrysC">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">入库单详情</h1>
    </div>
    <div class="wrapper-md">
        <div class="panel panel-default">
            <div class="table-responsive">
                <form name="form" class="form-validation">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="form-group">
                                <label>创建人</label>
                                <input type="text" class="form-control" readonly="readonly" value="{{orderdetaildata.Creater.Name}}">
                            </div>
                            <div class="form-group">
                                <label>创建时间</label>
                                <input type="text" class="form-control" readonly="readonly" value="{{orderdetaildata.CreateTime}}">
                            </div>
                        </div>
                        <div class="container-fluid text-center bg-light lter" >
                            <div class="row">
                                <h3 style="display: inline-block;margin: 0 auto">采购单商品列表</h3>
                            </div>
                        </div>
                        <div class="container-fluid">
                            <div class="row" style="border-bottom: red solid 1px" ng-repeat="item in orderdetaildata.StockGoods">
                                <div class="col-xs-12 col-md-12">
                                    <div>名称/材质/规格：{{item.Commodity.Name}}/{{item.Commodity.Standard}}/{{item.Commodity.Format}}</div>
                                    <div>单价：{{item.Price | number:2}}/t</div>
                                    <div>数量：{{item.Count}}</div>
                                    <div>总质量：{{item.TotalWeight | number:3}}t</div>
                                    <div>总价：{{item.Price | number:2}}*{{item.TotalWeight | number:3}}t={{item.Price*item.TotalWeight | number:2}}</div>
                                </div>
                            </div>
                            <!--<div class="row text-left">-->
                                <!--<h4 style="display: inline-block">总价：{{orderdetaildata.Total | number:2}}</h4>-->
                            <!--</div>-->
                            <!--<div class="row text-left">-->
                                <!--<h4 style="display: inline-block">预计运费价格：{{orderdetaildata.DeliveryPriceTotal | number:2}}</h4>-->
                            <!--</div>-->
                            <div class="row text-right">
                                <button type="button" class="btn btn-success" ng-click="goorderList()">返回入库单列表</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script>
    angular.module('app')
            //采购单详情控制器
            .controller("Supplier_MoreWarehouseEntrysC", function ($scope, $state, $stateParams, $http) {
                $scope.id = $stateParams.id;
                //获取采购单详细数据
                $http({
                    url: "../api/Provider/GetWarehouseEntry?warehouseEntryId=" + $scope.id,
                    method: "GET"
                })
                        .then(function (res) {
                            $scope.orderdetaildata = res.data.Data;
                            console.log($scope.orderdetaildata);
                            $scope.ProviderId = res.data.Data.ProviderId;
                        })
                        .then(function (error) {
                            if (error) {
                                console.log("error");
                            }
                        });
                //返回计划单列表
                $scope.goorderList = function () {
                    $state.go('app.Depot_WarehouseEntrys',{ id: $scope.ProviderId })
                };

            })
</script>